import { Meta, StoryObj } from "@storybook/react/*";
import Tabs from "./tabs";
import TabItem from "./tabItem";

const meta:Meta<typeof Tabs> = {
    title: 'Tabs 标签页',
    component: Tabs,
    // @ts-ignore
    subcomponents: { TabItem },
    tags: ['autodocs'],
    parameters: {
        controls: {
            expanded: true,
        },
    },
    argTypes: {}
}

export default meta;

type Story = StoryObj<typeof meta>

export const DefaultTabs: Story = {
    args: {
        type:'line',
        size:'middle',
        children:[
            <TabItem label="line1">this is line1</TabItem>,
            <TabItem label="line2">this is line2</TabItem>,
            <TabItem label="line3" disabled>this is line3</TabItem>,
            <TabItem label="line4">this is line4</TabItem>,
            <TabItem label="line5">this is line5</TabItem>,
        ]
    }
}
DefaultTabs.storyName = '默认的Tabs栏'

export const CardTabs: Story = {
    args: {
        type:'card',
        size:'small',
        children:[
            <TabItem label="line1">this is line1</TabItem>,
            <TabItem label="line2">this is line2</TabItem>,
            <TabItem label="line3">this is line3</TabItem>,
            <TabItem label="line4">this is line4</TabItem>,
            <TabItem label="line5">this is line5</TabItem>,
        ]
    }
}
CardTabs.storyName = '其他样式的Tabs栏'

export const LefTabs: Story = {
    args: {
        type:'line',
        tabPosition:'left',
        size:'small',
        children:[
            <TabItem label="line1">this is line1</TabItem>,
            <TabItem label="line2">this is line2</TabItem>,
            <TabItem label="line3">this is line3</TabItem>,
            <TabItem label="line4">this is line4</TabItem>,
            <TabItem label="line5">this is line5</TabItem>,
        ]
    }
}
LefTabs.storyName = '其他方向的Tabs栏'